package com.kuizii.demo.web.viewModel;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Data
public class RegistRequest {

    /***
     * 1.邮箱验证 2.手机短信验证
     */
    public Integer registType;

    public Integer accountType;

    @Email(message = "邮箱格式不正确")
    @NotBlank(message = "邮箱为必填")
    public String email;


    @NotBlank(message = "手机号为必填")
    public String phone;

    @NotBlank(message = "密码为必填")
    @Length(message = "密码最少为8位字符,最长20位", min = 8, max = 16)
    public String password;

    @NotBlank(message = "确认密码为必填")
    public String rePassword;


    public String tempToken;

    public String backUrl;

    @NotNull(message = "平台信息不完善")
    public Integer platform;
}
